//
//  DGLineChartViewController.m
//  DGChartDraw
//
//  Created by yidong on 16/11/7.
//  Copyright © 2016年 东哥. All rights reserved.
//

#import "DGLineChartViewController.h"
#import "DGLineChartView.h"

@interface DGLineChartViewController ()

@end

@implementation DGLineChartViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    
    DGLineChartView *lineChart = [[DGLineChartView alloc] initWithFrame:CGRectMake(10, 180, self.view.frame.size.width-20, 300) andLineChartType:DGChartLineValueNotForEveryX];
    
    lineChart.xLineDataArr = @[@[@"-3",@"-2",@"-1"],@[@0,@1,@2,@3,]];
    lineChart.lineChartQuadrantType = DGLineChartQuadrantTypeAllQuardrant;
    
    lineChart.valueArr = @[@[@"5",@"-22",@"7",@(-4),@25,@15,@"10"],];
    
    /* 值折线的折线颜色 默认暗黑色*/
    lineChart.valueLineColorArr =@[ [UIColor purpleColor], [UIColor brownColor]];
    
    /* 值点的颜色 默认橘黄色*/
    lineChart.pointColorArr = @[[UIColor orangeColor],[UIColor yellowColor]];
    
    /* X和Y轴的颜色 默认暗黑色 */
    lineChart.xAndYLineColor = [UIColor greenColor];
    
    /* XY轴的刻度颜色 m */
    lineChart.xAndYNumberColor = [UIColor blueColor];
    //是否为曲线
    lineChart.pathCurve = _iscurePath;
    
    [self.view addSubview:lineChart];
    
    [lineChart showAnimation];

}
@end
